import service from '@/utils/service'

//获取详情头部和内容简介
export const reqGetAlbumsDetailHeader = (id: number) =>
  service.get(`/m-revision/page/album/v2/queryAlbumPage/${id}`)

// 获取节目列表信息
export const reqGetAlbumsColumnInfo = (albumId: number, sort: boolean) =>
  service.get(
    `/m-revision/common/album/queryAlbumTrackRecordsByPage?albumId=${albumId}&page=1&pageSize=10&asc=${sort}&countKeys=play%2Ccomment&v=1692018651710`
  )

// 获取主播信息
export const reqGetAnchorUserInfo = (anchorId: number) =>
  service.get(
    `/m-revision/common/user/queryUserInfo/${anchorId}?userCountKeys=follower`
  )
// 获取主播作品
export const reqGetAnchorComposition = (
  anchorId: number,
  page: number,
  pageSize: number
) =>
  service.get(
    `/m-revision/common/anchor/queryAnchorAlbumsByPage?anchorId=${anchorId}&page=${page}&pageSize=${pageSize}&asc=${true}`
  )
//相似专辑的数据
export const reqGetSimilarAlbumInfo = (
  kw: string,
  page: number,
  rows: number,
  device: string = 'iPhone',
  condition: string = 'relation',
  spellchecker: boolean = true,
  core: string = 'album'
) =>
  service.get(
    `/revision/search/seo?kw=${kw}&page=${page}&rows=${rows}&device=${device}&condition=${condition}&spellchecker=${spellchecker}&core=${core}`
  )

// 猜你喜欢的数据
export const reqGetLikeList = (
  pageNum: number,
  pageSize: number,
  sort: number
) =>
  service.get(
    `/revision/category/v2/albums?pageNum=${pageNum}&pageSize=${pageSize}&sort=${sort}`
  )

// 获取评价信息

export const reqGetAnchorComments = (
  page: number,
  pageSize: number,
  albumId: number
) =>
  service.get(
    `/m-revision/common/album/queryAlbumCommentsByPage?page=${page}&pageSize=${pageSize}&albumId=${albumId}&v=${Date.now()}`
  )
